package com.bwie.ES;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.DateFormat;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "eslianxi")
public class pojoES {

    @Id
    @Field(type = FieldType.Keyword)
    private String vId;
    @Field(type = FieldType.Text,analyzer = "ik_max_word")
    private String vName;
    @Field(type = FieldType.Date,format = DateFormat.custom,pattern = "yyyy-MM-dd")
    private Date vTime;


}
